<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Authorization Page</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f0f0f0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
        }
        .auth-container {
            background-color: #fff;
            padding: 20px;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            width: 300px;
            text-align: center;
        }
        .auth-container h2 {
            margin-bottom: 20px;
        }
        .auth-container button {
            padding: 10px 20px;
            margin: 5px;
            border: none;
            border-radius: 3px;
            cursor: pointer;
        }
        .auth-container .approve {
            background-color: #28a745;
            color: white;
        }
        .auth-container .deny {
            background-color: #dc3545;
            color: white;
        }
    </style>
</head>
<body>
<div class="auth-container">
    <h2>授权请求</h2>
    <p>客户端请求权限：</p>
    <form action="/oauth/authorize" method="post">
        <input type="hidden" name="client_id" th:value="${client_id}">
        <input type="hidden" name="response_type" th:value="${response_type}">
        <input type="hidden" name="redirect_uri" th:value="${redirect_uri}">
        <input type="hidden" name="scope" th:value="${scope}">
        <input type="hidden" name="state" th:value="${state}">
        <input type="hidden" id="user_oauth_approval" name="user_oauth_approval" value="true">
        <button type="submit" class="approve" onclick="document.getElementById('user_oauth_approval').value='true'">同意</button>
        <button type="submit" class="deny" onclick="document.getElementById('user_oauth_approval').value='false'">拒绝</button>
    </form>
</div>
</body>
</html>
